<div class="contenidolargo">
<div class="ciuexams view">
		<div class="breadcrumb">
			<li>
			<?php echo $this->Html->link("Exámenes", array('controller' => 'ciuexams', 'action' => 'index')); ?>
			</li>
			<li class="divider">|</li>
			<li>
			<?php echo "Examen" ?>
			</li>
		</div>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Código examen'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $ciuexam['Ciuexam']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $ciuexam['Ciuexam']['name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Examination Date'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $ciuexam['Ciuexam']['examination_date']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Location'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $ciuexam['Ciuexam']['location']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Ciuplan'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
		    <?php echo $ciuexam['Ciuplan']['name']; ?>
			<?php //echo $this->Html->link($ciuexam['Ciuplan']['name'], array('controller' => 'ciuplans', 'action' => 'view', $ciuexam['Ciuplan']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Ciuexamstate'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $ciuexam['Ciuexamstate']['name'] ; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Capacidad'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $ciuexam['Ciuexam']['capacity'] ; ?>
			&nbsp;
		</dd>
	</dl>
</div>

<div class="buttonline">
	<button>
		<?php    echo $this->Html->link('Adicionar Aspirante', array('controller' => 'ciuexam_ciuusers', 'action' => 'add',$ciuexam['Ciuexam']['id'],$ciuexam['Ciuplan']['id'],$ciuexam['Ciuacademicperiod']['id']));?>
	</button>
</div>

<div class="related">
	<h3><?php __('Aspirantes');?></h3>
	<?php if (!empty($ciuexam['CiuexamCiuuser'])):?>
	<table class="zebra" cellpadding = "0" cellspacing = "0">
	<thead>
	<tr>
		<th><?php __('N° Registro'); ?></th>
		<th><?php __('Ciuuser Id'); ?></th>
		<th><?php __('Grade'); ?></th>
		<th><?php __('Asignatura'); ?></th>
		<th><?php __('Admision'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	</thead>
	<tbody>
	<?php
		$i = 0;
		foreach ($ciuexam['CiuexamCiuuser'] as $ciuexamCiuuser):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
                        <td><?php echo $ciuexamCiuuser['ciuuser_id'];      ?></td>
			<td><?php if( isset($takers[ $ciuexamCiuuser['ciuuser_id'] ])  )
                                   { echo $takers[ $ciuexamCiuuser['ciuuser_id'] ]; } ?>
                        </td>
			<td><?php echo $ciuexamCiuuser['grade'];?></td>
			<td><?php echo $ciuexamCiuuser['ciusubject_id'];?></td>
			<td><?php if( isset($states[ $ciuexamCiuuser['ciuuser_id'] ])  )
                                {  echo $states[ $ciuexamCiuuser['ciuuser_id'] ]; } ?>
                        </td>
			<td class="actions">
				<?php echo $this->Html->link(__('Grade', true), array('controller' => 'ciuexam_ciuusers', 'action' => 'grade',   $ciuexamCiuuser['id'] )); ?>
				<?php echo $this->Html->link(__('Admit', true), array('controller' => 'ciuusers', 'action' => 'admit',   $ciuexamCiuuser['ciuuser_id'], $ciuexamCiuuser['ciuexam_id'] )); ?>
				<?php echo $this->Html->link(__('Reject', true), array('controller' => 'ciuusers', 'action' => 'reject', $ciuexamCiuuser['ciuuser_id'], $ciuexamCiuuser['ciuexam_id'] )); ?>			
			</td>
		</tr>
	<?php endforeach; ?>
	</tbody>
	</table>
<?php endif; ?>

</div>

</div>	